package com.gjw.designpattern.prototype;


public class Prototype implements Cloneable{

    private String fileName;

    Prototype(){
        System.out.println("创建了一个新的对象");
    }

    public Object clone() throws CloneNotSupportedException {
        System.out.println("克隆了一个对象");
        return (Prototype)super.clone();
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
}
